Skip to content

Conversation

@iamgabrielma
Copy link
Contributor

Closes WOOMOB-1461

Description

With POS surveys we want to schedule a notification only once per app install, this PR adds support for storing if this notification has already been sent or not.

Changes

  • Updated GeneralAppSettings with a new property isPOSSurveyNotificationScheduled.
  • Updated AppSettingsAction with 3 functions to set, get, and reset the value.

Testing

Currently not used, we'll hook it up later. For the moment, CI should pass.

@iamgabrielma iamgabrielma added type: task An internally driven task. feature: POS labels Oct 10, 2025
@iamgabrielma iamgabrielma added this to the 23.5 milestone Oct 10, 2025
@wpmobilebot
Copy link
Collaborator

App Icon📲 You can test the changes from this Pull Request in WooCommerce iOS Prototype by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS Prototype
Build Numberpr16233-7a73f6f
Version23.4
Bundle IDcom.automattic.alpha.woocommerce
Commit7a73f6f
Installation URL469kns0tv07ro
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@joshheald
Copy link
Contributor

@staskus can I pass this one over to you please? I'm out of time today...

@iamgabrielma iamgabrielma requested a review from staskus October 13, 2025 00:37
Copy link
Contributor

@staskus staskus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code changes look good!

With POS surveys we want to schedule a notification only once per app install, this PR adds support for storing if this notification has already been sent or not.

Does AppSettingStore works once per app install or gets reset after login/logout?

@iamgabrielma
Copy link
Contributor Author

iamgabrielma commented Oct 13, 2025

Does AppSettingStore works once per app install or gets reset after login/logout?

That's a good question. Initially I though that these would reset on switching sites, but on looking at AppSettingsStore and DefaultStoresManager my understanding is that there's ~2 layers of resetting data: On switching stores, and on logging out of the app. Both seems to require that we reset them manually if we want to, otherwise the default behavior is to persist through sessions per device. The third option is reinstall the app, which resets everything.

We also have UserDefaults+Woo which would work as well and is synchronous, and many settings here are cleared in SessionManager when logging out.

Triggering conditions are still a bit unclear regarding a merchant that may have multiple sites or if these should be mutually exclusive, and we could have a couple of edge cases here depending on the final spec. I'm confirming with Android what's the expected behavior on p1760339880670259?thread_ts=1760066960.650969&cid=C070SJRA8DP-slack-C070SJRA8DP

@iamgabrielma iamgabrielma merged commit d3161bf into trunk Oct 13, 2025
20 of 22 checks passed
@iamgabrielma iamgabrielma deleted the task/WOOMOB-1461-pos-survey-store-send-value branch October 13, 2025 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: POS type: task An internally driven task.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants